Skip to content

feat: Swap Swagger UI with Scalar UI docs for Chapters 2, 3, and 4#245

Open
Copilot wants to merge 3 commits intomainfrom
copilot/update-chapter-2-3-4-contracts-monolith
Open

feat: Swap Swagger UI with Scalar UI docs for Chapters 2, 3, and 4#245
Copilot wants to merge 3 commits intomainfrom
copilot/update-chapter-2-3-4-contracts-monolith

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 29, 2026

📋 Description

Extends the Scalar API documentation integration from Chapter 1 (PR #236) to Chapters 2, 3, and 4 — covering both the Fitnet monolith and Fitnet.Contracts microservice where applicable.

Changes across all 5 affected projects (Ch2/Fitnet, Ch3/Fitnet, Ch3/Fitnet.Contracts, Ch4/Fitnet, Ch4/Fitnet.Contracts):

  • Directory.Packages.props — replace Swashbuckle.AspNetCore with Scalar.AspNetCore v2.12.17
  • .csproj — update package reference
  • Program.cs — migrate to native OpenAPI + Scalar:
    // Before
    builder.Services.AddEndpointsApiExplorer();
    builder.Services.AddSwaggerGen();
    // ...
    app.UseSwagger();
    app.UseSwaggerUI();
    
    // After
    builder.Services.AddOpenApi();
    // ...
    app.MapOpenApi();
    app.MapScalarApiReference("/docs/v1");
  • launchSettings.jsonlaunchUrl: swaggerdocs/v1; remove IIS Express profile
  • ApiDocumentationExtensions.cs (Ch2 only) — root redirect updated from /swagger/docs/v1; file renamed from SwaggerDocumentationExtensions.cs to ApiDocumentationExtensions.cs to match the class name

📦 PR Includes

  • Feature added 🆕
  • Bug fix 🐛
  • Code refactor 🔄
  • Documentation update 📚
  • Tests added/updated 🧪
  • Other: (describe)

🚫 PR Does Not Include

  • Breaking changes ❌
  • Major architectural changes 🏗️
  • Unrelated features/tasks 🚫

💡 Additional Notes

API docs available at /docs/v1 in development mode. Consistent with the Chapter 1 implementation.


⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.

Copilot AI changed the title [WIP] Update chapter 2 and 3 contracts and monolith for chapter 4 feat: Swap Swagger UI with Scalar UI docs for Chapters 2, 3, and 4 Mar 29, 2026
Copilot AI requested a review from kamilbaczek March 29, 2026 21:36
@kamilbaczek kamilbaczek marked this pull request as ready for review March 30, 2026 05:17
@@ -7,7 +7,7 @@
public static class ApiDocumentationExtensions
{
public static void UseApiDocumentation(this IEndpointRouteBuilder app) =>
app.MapGet("/", () => Results.Redirect("/swagger"))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename file to ApiDocumentationExtensions @copilot

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 5f897c1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants